<template>
    <div>
        <h1>App</h1>
        <input type="text" v-model="firstName">
    </div>
</template>
<script setup>
// 组合式API 、选项式（淘汰）
import { computed, ref, watch } from 'vue';

const firstName = ref('li');
const lastName = ref('jack');

watch([firstName, lastName], ([a1, b1], [a2, b2]) => {
    console.log(a1, b1);
});

// watch([firstName, lastName], (a, b) => {
//     console.log(a, b);
// })



</script>

<style>
div {
    border: solid;
    padding: 10px;
}
</style>